package engine.fov;

import java.util.List;

/**
 * An interface for LOS and projection.
 * 
 * @author sdatta
 */
public interface ILosAlgorithm {

	/**
	 * Calculates if line of sight exists between point startX, startY and endX, endY. Optionally
	 * calculate the path of projection.
	 * 
	 * @param board
	 *            The board to be visited.
	 * @param startX
	 *            Starting position:x
	 * @param startY
	 *            Starting position:y
	 * @param endX
	 *            Target location:x
	 * @param endY
	 *            Target location:y
	 * @param calculateProject
	 *            Whether to also calculate the path from the source to the target.
	 * @return true if the line of sight exists
	 */
	public abstract boolean existsLineOfSight(Board board, int startX, int startY, int endX,
			int endY, boolean calculateProject);

	/**
	 * Obtain the path of the projection calculated during the last call to existsLineOfSight.
	 * 
	 * @return a list of points representing a path a projectile could travel to get from (startX,
	 *         startY) to (endX, endY)
	 */
	public abstract List<Point2I> getProjectPath();

}